<template>
  <div style="height:100%;width:100%" class="workspace">
    <el-container ref="listWarp" style="height: 100%;background-color:#fff" v-loading="loading">
      <div
        class="win-warp"
        style="height: auto;width: 1200px;background-color: #fff;margin: 0 auto;margin-top: 50px;"
      >
        <div style="width: 100%;text-align:center;font-size:20px;padding-bottom:35px">西安理工大学选房申请</div>
        <div
          style="width: 100%;text-align:center;font-size:18px;padding-bottom:35px;color: red;"
          v-if="applyForm.content!=''"
        >{{applyForm.content}}</div>
        <div style="width: 100%">
          <el-form
            :model="applyForm"
            :rules="rules"
            ref="ruleForm"
            label-width="150px"
            class="demo-ruleForm"
          >
            <el-row :gutter="20">
              <el-col :span="11">
                <el-form-item label="申请人工号" prop="account">
                  <el-input size="small" v-model="applyForm.account" disabled></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="11">
                <el-form-item label="申请人姓名" prop="name">
                  <el-input size="small" v-model="applyForm.name" disabled></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="11">
                <el-form-item label="申请人员类别" prop="userType" style="width: 100%;">
                  <el-select
                    size="small"
                    :disabled="applyForm.status=='1'"
                    v-model="applyForm.userType"
                    filterable
                    style="width: 100%;"
                  >
                    <el-option
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                      v-for="item in itemList"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="11">
                <el-form-item label="选房队列" prop="batchId" style="width: 100%;">
                  <el-select
                    size="small"
                    v-model="applyForm.batchId"
                    filterable
                    style="width: 100%;"
                    @change="getIsThisBatchHasSelected"
                  >
                    <el-option
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                      v-for="item in optionalBatchList"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <!-- <el-row :gutter="20">
              <el-col :span="11">
                <el-form-item label="校内现有住房信息">
                  <el-input size="small" v-model="houseInfo" disabled></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="11">
                <el-form-item label="住房信息是否正确" prop="houseInfoIsTrue">
                  <el-radio-group v-model="houseInfoIsTrue">
                    <el-radio label="1">是</el-radio>
                    <el-radio label="0">否</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>-->
            <!-- <el-row :gutter="20">
              <el-col :span="11" style="width:64%;display:flex">
                <el-form-item label="修正住房信息" style="width: 93%;">
                  <el-select
                    size="small"
                    v-model="applyForm.buildingId"
                    style="width: 96%;"
                    placeholder="请选择楼宇"
                    @change="handRoom"
                    filterable
                  >
                    <el-option
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                      v-for="item in buildingList"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label label-width="60px">
                  <el-select
                    size="small"
                    v-model="applyForm.roomId"
                    style="width: 100%;"
                    placeholder="请选择房间"
                    filterable
                    @focus="isCheckBuildingId"
                    @change="isCheckBuildingId"
                  >
                    <el-option
                      :key="item.id"
                      :label="item.roomNo"
                      :value="item.id"
                      v-for="item in roomList"
                    ></el-option>
                  </el-select>
                  <span v-if="isCheckBuildingIdFlag" class="itemError">请先选择楼宇</span>
                </el-form-item>
              </el-col>
              <el-col :span="6"></el-col>
              <span
                style="display: inline-block;margin-top: 10px;margin-left: 10px;color:rgb(245, 125, 13)"
              >注:申请人校内家庭住房信息</span>
            </el-row>-->
            <el-row :gutter="20">
              <el-col :span="11">
                <el-form-item label="申请人联系方式" prop="phone">
                  <el-input
                    size="small"
                    v-model="applyForm.phone"
                    :disabled="applyForm.status=='1'"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="11">
                <el-form-item label="是否双职工" prop="isDoubleEmployees">
                  <el-radio-group
                    v-model="applyForm.isDoubleEmployees"
                    :disabled="applyForm.status=='1'"
                  >
                    <el-radio label="1">是</el-radio>
                    <el-radio label="0">否</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row v-if="applyForm.isDoubleEmployees == '1'" :gutter="20">
              <el-col :span="11">
                <el-form-item label="配偶工号" prop="spouseAccount">
                  <el-input
                    size="small"
                    v-model="applyForm.spouseAccount"
                    :disabled="applyForm.status=='1'"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="11">
                <el-form-item label="配偶姓名" prop="spouseName">
                  <el-input
                    size="small"
                    v-model="applyForm.spouseName"
                    :disabled="applyForm.status=='1'"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20" v-for="(item,index) in applyForm.newSelf" :key="index">
              <el-col :span="11">
                <el-form-item label="本人校内住房">
                  <el-input size="small" :value="item.houseName" :disabled="applyForm.status=='1'"></el-input>
                  <!-- ; -->
                </el-form-item>
              </el-col>
              <el-col :span="11">
                <el-form-item label="修正住房信息">
                  <el-select
                    size="small"
                    :disabled="applyForm.status=='1'"
                    v-model="item.buildingId"
                    clearable
                    style="width: 48%;"
                    placeholder="请选择楼宇"
                    @change="handRoom(item.buildingId,index)"
                    filterable
                  >
                    <el-option
                      :key="item1.id"
                      :label="item1.name"
                      :value="item1.id"
                      v-for="item1 in buildingList"
                    ></el-option>
                  </el-select>
                  <el-select
                    size="small"
                    :disabled="applyForm.status=='1'"
                    v-model="item.roomId"
                    style="width: 48%;margin-left:15px"
                    placeholder="请选择房间"
                    filterable
                    @focus="isCheckBuildingId"
                    @change="isCheckBuildingId(item,index)"
                  >
                    <el-option
                      :key="item1.id"
                      :label="item1.roomNo"
                      :value="item1.id"
                      v-for="item1 in roomList[index]"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row
              :gutter="20"
              v-for="(item,index) in applyForm.newSpouse"
              :key="index+'1'"
              v-if="applyForm.isDoubleEmployees == '1'"
            >
              <el-col :span="11">
                <el-form-item label="配偶校内住房">
                  <el-input size="small" :value="item.houseName" :disabled="applyForm.status=='1'"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="11">
                <el-form-item label="修正配偶住房信息">
                  <el-select
                    size="small"
                    :disabled="applyForm.status=='1'"
                    v-model="item.buildingId"
                    clearable
                    style="width: 48%;"
                    placeholder="请选择楼宇"
                    @change="handRoom1(item.buildingId,index)"
                    filterable
                  >
                    <el-option
                      :key="item1.id"
                      :label="item1.name"
                      :value="item1.id"
                      v-for="item1 in buildingList"
                    ></el-option>
                  </el-select>
                  <el-select
                    size="small"
                    v-model="item.roomId"
                    style="width: 48%;margin-left:15px"
                    :disabled="applyForm.status=='1'"
                    placeholder="请选择房间"
                    filterable
                    @focus="isCheckBuildingId"
                    @change="isCheckBuildingId(item,index)"
                  >
                    <el-option
                      :key="item1.id"
                      :label="item1.roomNo"
                      :value="item1.id"
                      v-for="item1 in roomList1[index]"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="文件上传">
              <el-upload
                :limit="limitNum"
                :disabled="applyForm.status=='1'"
                action="/api/file/upload"
                accept=".jpeg, .jpg, .png, .gif"
                :data="Imgdata"
                :headers="headers"
                :before-upload="beforeUploadFile"
                :on-change="fileChange"
                :on-exceed="exceedFile"
                :on-success="handleSuccess"
                :on-remove="handRemove"
                :on-error="handleError"
                :file-list="fileList"
              >
                <el-button size="small" type="primary">立即上传</el-button>
                <div class="el-upload__tip" slot="tip">只能上传(jpeg,jpg,png,gif)文件，且不超过10M</div>
                <!-- jpeg, jpg, png, gif, bmp, xls, xlsx, doc, docx -->
                <!-- accept=".xls, .xlsx, .jpeg, .jpg, .png, .gif, .bmp, .doc, .docx" -->
              </el-upload>
              <!-- <el-button size="small" type="primary" @click="uploadFile">立即上传</el-button>
              <el-button size="small">取消</el-button>-->
            </el-form-item>
            <el-form-item label prop="checked">
              <el-checkbox v-model="applyForm.checked">本人承诺所填信息真实有效。否则，自愿放弃本次集资选房资格</el-checkbox>
            </el-form-item>
          </el-form>
        </div>
        <div class="dialog-footer" style="background-color: #fff;border: none;">
          <el-button @click="$router.go(-1)">取 消</el-button>
          <el-button
            class="btn"
            type="primary"
            @click="submitForm('ruleForm')"
            :disabled="applyForm.status=='1'"
          >确定</el-button>
        </div>
      </div>
    </el-container>
  </div>
</template>

<script>
import { chooseRoomApi } from "@/api/chooseRoom";
import Token from "@/itsoftUI/auth/token.js";
import axios from "axios";
import { compression } from "@/itsoftUI/utils/imgCompression";
export default {
  name: "TransactionCenter",
  data() {
    var checkPhone = (rule, value, callback) => {
      if (!value) {
        return callback(new Error("手机号不能为空"));
      } else {
        const reg = /^1[3|4|5|7|8][0-9]\d{8}$/;
        if (reg.test(value)) {
          callback();
        } else {
          return callback(new Error("请输入正确的手机号"));
        }
      }
    };
    return {
      headers: {
        Token: "",
        TokenKey: "",
      },
      limitNum: 6, // 上传excell时，同时允许上传的最大数
      fileList: [], // excel文件列表
      Imgdata: { system: "account" },
      FormVisible: false,
      loading: false,
      buildingList: [],
      roomList: [],
      roomList1: [],
      itemList: [],
      optionalBatchList: [],
      isCheckBuildingIdFlag: false,
      nowWeek: "",
      nowDate: "",
      nowTime: "",
      applyForm: {
        id: "",
        account: "",
        name: "",
        buildingId: "",
        roomId: "",
        userType: "",
        isDoubleEmployees: "0",
        spouseAccount: "",
        spouseName: "",
        phone: "",
        batchId: "",
        checked: "",
        content: "",
        status: 0,
        chooseStatus: 0,
        timer: null,
        selfRoom: [],
        spouseRoom: [],
        newSelf: [
          {
            buildingId: "",
            buildingName: "",
            houseType: "",
            isAvailable: "1",
            roomId: "",
            roomNum: "",
            houseName: "",
          },
          {
            buildingId: "",
            buildingName: "",
            houseType: "",
            isAvailable: "1",
            roomId: "",
            roomNum: "",
            houseName: "",
          },
        ],
        newSpouse: [
          {
            buildingId: "",
            buildingName: "",
            houseType: "",
            isAvailable: "1",
            roomId: "",
            roomNum: "",
            houseName: "",
          },
          {
            buildingId: "",
            buildingName: "",
            houseType: "",
            isAvailable: "1",
            roomId: "",
            roomNum: "",
            houseName: "",
          },
        ],
        fileVOS: [],
      },
      fileVOS: [],
      rules: {
        account: [
          { required: true, message: "请填写申请人工号", trigger: "change" },
        ],
        name: [
          { required: true, message: "请填写申请人姓名", trigger: "change" },
        ],
        buildingId: [
          { required: true, message: "申请人家庭住房信息", trigger: "change" },
        ],
        roomId: [{ required: true, message: "请填写楼号", trigger: "change" }],
        userType: [
          { required: true, message: "请填写申请人员类别", trigger: "change" },
        ],
        isDoubleEmployees: [
          {
            required: true,
            message: "请填写选择是否双职工",
            trigger: "change",
          },
        ],
        spouseAccount: [
          { required: true, message: "请填写配偶工号", trigger: "change" },
        ],
        phone: [
          {
            required: true,
            validator: checkPhone,
            trigger: "blur",
          },
        ],
        batchId: [{ required: true, message: "选房队列", trigger: "change" }],
        spouseName: [
          { required: true, message: "请填写配偶姓名", trigger: "change" },
        ],
        checked: [
          { required: true, message: "请确认信息真实有效", trigger: "change" },
        ],
      },

      getInfo: false,
      houseInfo: "",
      houseInfoIsTrue: "",
    };
  },
  methods: {
    // 文件超出个数限制时的钩子
    exceedFile(files, fileList) {
      this.$message.warning(
        `只能选择 ${this.limitNum} 个文件，当前共选择了 ${
          files.length + fileList.length
        } 个`
      );
    },
    // 文件状态改变时的钩子
    fileChange(file, fileList) {},
    handRemove(file, fileList) {
      if (file.response) {
        for (var i = 0; i < this.fileList.length; i++) {
          if (this.fileList[i] == file.response.data.path) {
            this.fileList.splice(i, 1);
            break;
          }
        }
      } else {
        for (var i = 0; i < this.fileList.length; i++) {
          if (this.fileList[i].path == file.path) {
            this.fileList.splice(i, 1);
            break;
          }
        }
      }

      if (file.response) {
        for (var i = 0; i < this.fileVOS.length; i++) {
          if (this.fileVOS[i] == file.response.data.path) {
            this.fileVOS.splice(i, 1);
            break;
          }
        }
      } else {
        for (var i = 0; i < this.fileVOS.length; i++) {
          if (file.path.indexOf(this.fileVOS[i]) != -1) {
            this.fileVOS.splice(i, 1);
            break;
          }
        }
      }
    },
    // 上传文件之前的钩子, 参数为上传的文件,若返回 false 或者返回 Promise 且被 reject，则停止上传
    beforeUploadFile(file) {
      this.headers.Token = Token.getToken();
      this.headers.TokenKey = Token.getTokenKey();
    },
    // 文件上传成功时的钩子
    handleSuccess(res, file, fileList) {
      this.fileVOS.push(res.data);
      this.$message.success("文件上传成功");
    },
    // 文件上传失败时的钩子
    handleError(err, file, fileList) {
      this.$message.error("文件上传失败");
    },

    //获取楼宇下拉
    getBuildingList() {
      chooseRoomApi.buildingList().then((res) => {
        if (res.status == "success") {
          this.buildingList = res.data;
          // this.handRoom(buildingId);
        }
      });
    },
    handRoom(buildingId, index) {
      // this.applyForm.roomId = "";
      this.applyForm.newSelf[index].roomId = "";
      this.getRoomList(buildingId, index);
    },
    handRoom1(buildingId, index) {
      // this.applyForm.roomId = "";
      this.applyForm.newSpouse[index].roomId = "";
      this.getRoomList1(buildingId, index);
    },
    cencal(formName) {
      this.$refs[formName].resetFields();
      this.applyForm = {};
    },
    getRoomList(buildingId, index) {
      chooseRoomApi.getRoomList(buildingId).then((res) => {
        if (res.status == "success") {
          this.roomList[index] = res.data;
          this.$forceUpdate();
        }
      });
    },
    getRoomList1(buildingId, index) {
      chooseRoomApi.getRoomList(buildingId).then((res) => {
        if (res.status == "success") {
          this.roomList1[index] = res.data;
          this.$forceUpdate();
        }
      });
    },
    //申请人员类别
    getItemDetail() {
      chooseRoomApi.getItemDetail().then((res) => {
        if (res.status == "success") {
          this.itemList = res.data;
        }
      });
    },
    //申请人批次
    getOptionalBatch() {
      chooseRoomApi.getOptionalBatch().then((res) => {
        if (res.status == "success") {
          this.optionalBatchList = res.data;
        }
      });
    },
    submitForm(formName) {
      this.loading = true;
      if (this.applyForm.isDoubleEmployees === 0) {
        this.applyForm.spouseAccount = "";
        this.applyForm.spouseName = "";
      }
      if (this.houseInfoIsTrue === 1) {
        this.applyForm.buildingId = "";
        this.applyForm.roomId = "";
      }
      this.applyForm.fileVOS = this.fileVOS;
      this.$refs[formName].validate((valid) => {
        if (valid) {
          chooseRoomApi
            .save(JSON.stringify(this.applyForm))
            .then((res) => {
              if (res.status == "success") {
                // this.$message.success("申请成功");

                // }
                this.$alert(
                  "选房申请提交成功，在未审核之前您还可以对申请进行修改！",
                  "",
                  {
                    confirmButtonText: "确定",
                    callback: (action) => {
                      this.$router.push("home");
                    },
                  }
                );
                this.$refs[formName].resetFields();
                this.loading = false;
                this.FormVisible = false;
              }
            })
            .catch((error) => {
              this.loading = false;
            });
        } else {
          this.loading = false;
          return false;
        }
      });
    },
    //判断有无选择楼宇
    isCheckBuildingId(item, index) {
      // item.houseName = item.buildingName + " 号楼 " + item.roomNum;
      if (!this.applyForm.buildingId) {
        this.isCheckBuildingIdFlag = true;
      } else {
        this.isCheckBuildingIdFlag = false;
      }
    },
    //获取登录人信息
    getLoginUserInfo() {
      this.loading = true;
      chooseRoomApi.getLoginUserInfo().then((res) => {
        // this.handRoom();
        this.applyForm.account = res.data.account;
        this.applyForm.id = res.data.id;
        this.applyForm.name = res.data.name;
        this.applyForm.userType = res.data.userType;
        this.applyForm.batchId = res.data.batchId;
        this.applyForm.buildingId = res.data.buildingId;
        this.applyForm.roomId = res.data.roomId;
        this.applyForm.phone = res.data.phone;
        this.applyForm.isDoubleEmployees = res.data.isDoubleEmployees;
        this.applyForm.spouseAccount = res.data.spouseAccount;
        this.applyForm.spouseName = res.data.spouseName;
        this.applyForm.status = res.data.status;
        this.applyForm.content = res.data.content;
        if (res.data.fileVOS) {
          this.fileList = res.data.fileVOS;
        }
        if (res.data.fileVOS) {
          this.fileVOS = res.data.fileVOS;
        }
        // this.applyForm.fileVOS = res.data.fileVOS;
        if (res.data.newSelf.length > 0) {
          this.applyForm.newSelf = res.data.newSelf;
        }
        if (res.data.newSpouse.length > 0) {
          this.applyForm.newSpouse = res.data.newSpouse;
        }
        let obj = {
          buildingId: "",
          buildingName: "",
          houseType: "",
          isAvailable: "1",
          roomId: "",
          roomNum: "",
          houseName: "",
        };
        if (res.data.newSelf.length == 1) {
          this.applyForm.newSelf.push(obj);
        }
        if (res.data.newSpouse.length == 1) {
          this.applyForm.newSpouse.push(obj);
        }

        this.applyForm.newSelf.forEach((item) => {
          if (item.buildingName && item.roomNum) {
            item.houseName = item.buildingName + " 号楼 " + item.roomNum;
          } else {
            item.houseName = "无";
          }
          this.roomList.push([]);
        });
        this.applyForm.newSpouse.forEach((item) => {
          if (item.buildingName && item.roomNum) {
            item.houseName = item.buildingName + " 号楼 " + item.roomNum;
          } else {
            item.houseName = "无";
          }
          this.roomList.push([]);
        });
        this.applyForm.newSelf.forEach((item, index) => {
          chooseRoomApi.getRoomList(item.buildingId).then((res) => {
            if (res.status == "success") {
              this.roomList[index] = res.data;
              this.$forceUpdate();
            }
          });
        });
        this.applyForm.newSpouse.forEach((item, index) => {
          chooseRoomApi.getRoomList(item.buildingId).then((res) => {
            if (res.status == "success") {
              this.roomList1[index] = res.data;
              this.$forceUpdate();
            }
          });
        });
        this.loading = false;
      });
    },
    getUserInfo() {},
    //查询用户是否申请过此批次
    getIsThisBatchHasSelected(batchId) {
      //批次改变重新获取信息
      (this.applyForm = {
        id: "",
        account: "",
        name: "",
        buildingId: "",
        roomId: "",
        userType: "",
        isDoubleEmployees: "0",
        spouseAccount: "",
        spouseName: "",
        phone: "",
        batchId: batchId,
        checked: "",
        content: "",
        status: 0,
        chooseStatus: 0,
        timer: null,
        selfRoom: [],
        spouseRoom: [],
        newSelf: [
          {
            buildingId: "",
            buildingName: "",
            houseType: "",
            isAvailable: "1",
            roomId: "",
            roomNum: "",
            houseName: "",
          },
          {
            buildingId: "",
            buildingName: "",
            houseType: "",
            isAvailable: "1",
            roomId: "",
            roomNum: "",
            houseName: "",
          },
        ],
        newSpouse: [
          {
            buildingId: "",
            buildingName: "",
            houseType: "",
            isAvailable: "1",
            roomId: "",
            roomNum: "",
            houseName: "",
          },
          {
            buildingId: "",
            buildingName: "",
            houseType: "",
            isAvailable: "1",
            roomId: "",
            roomNum: "",
            houseName: "",
          },
        ],
        fileVOS: [],
      }),
        console.dir();
      this.loading = true;
      chooseRoomApi.getUserInfobyBatchId(batchId).then((res) => {
      
        // this.handRoom();
        this.applyForm.account = res.data.account;
        this.applyForm.id = res.data.id;
        this.applyForm.name = res.data.name;
        this.applyForm.userType = res.data.userType;
        this.applyForm.buildingId = res.data.buildingId;
        this.applyForm.roomId = res.data.roomId;
        this.applyForm.phone = res.data.phone;
        this.applyForm.isDoubleEmployees = res.data.isDoubleEmployees;
        this.applyForm.spouseAccount = res.data.spouseAccount;
        this.applyForm.spouseName = res.data.spouseName;
        this.applyForm.status = res.data.status;
        this.applyForm.content = res.data.content;
        this.fileList = [];
        this.fileVOS = [];
        if (res.data.fileVOS) {
          this.fileList = res.data.fileVOS;
        }
        if (res.data.fileVOS) {
          this.fileVOS = res.data.fileVOS;
        }
        // this.applyForm.fileVOS = res.data.fileVOS;
        if (res.data.newSelf.length > 0) {
          this.applyForm.newSelf = res.data.newSelf;
        }
        if (res.data.newSpouse.length > 0) {
          this.applyForm.newSpouse = res.data.newSpouse;
        }
        let obj = {
          buildingId: "",
          buildingName: "",
          houseType: "",
          isAvailable: "1",
          roomId: "",
          roomNum: "",
          houseName: "",
        };
        if (res.data.newSelf.length == 1) {
          this.applyForm.newSelf.push(obj);
        }
        if (res.data.newSpouse.length == 1) {
          this.applyForm.newSpouse.push(obj);
        }

        this.applyForm.newSelf.forEach((item) => {
          if (item.buildingName && item.roomNum) {
            item.houseName = item.buildingName + " 号楼 " + item.roomNum;
          } else {
            item.houseName = "无";
          }
          this.roomList.push([]);
        });
        this.applyForm.newSpouse.forEach((item) => {
          if (item.buildingName && item.roomNum) {
            item.houseName = item.buildingName + " 号楼 " + item.roomNum;
          } else {
            item.houseName = "无";
          }
          this.roomList.push([]);
        });
        this.applyForm.newSelf.forEach((item, index) => {
          chooseRoomApi.getRoomList(item.buildingId).then((res) => {
            if (res.status == "success") {
              this.roomList[index] = res.data;
              this.$forceUpdate();
            }
          });
        });
        this.applyForm.newSpouse.forEach((item, index) => {
          chooseRoomApi.getRoomList(item.buildingId).then((res) => {
            if (res.status == "success") {
              this.roomList1[index] = res.data;
              this.$forceUpdate();
            }
          });
        });
        this.loading = false;
      });
    },
  },
  created() {
    this.getUserInfo();
    this.getItemDetail();
    this.getOptionalBatch();
    // }
    this.houseInfo = "";
    this.getInfo = false;
    this.getBuildingList();
    this.getLoginUserInfo();
  },
  watch: {},
};
</script>
<style lang="scss" scoped>
</style>

